<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>쿠폰플래이</title>
</head>
<body>
<div id =header>
<h3><img src="http://couponplay.kr/image/logo-1.png">회원정보
</h3></div>
<p>* 표시는 필수 입력 사항입니다.</p>
<form id="form1" name="form1" method="post" action="/member/joinForm.html">
	<fieldset>
		<table summary="회원가입양식">
			<tbody>
				<tr>
					<th scope="row" align="left">
						* 아이디(이메일)
					</th>
					<td>
						${member.id}
					</td>
					<th scope="row" align="left">
						<!--input type="image" alt="이메일 인증하기"-->
					</th>									
				</tr>
				<tr>
					<th scope="row" align="left">
						* 이름
					</th>
					<td>
						${member.name}
					</td>				
				</tr>
				<tr>
					<th scope="row" align="left">
						* 성별
					</th>
					<td>
						<c:if test="${member.sex == 'M'}">남자</c:if>
						<c:if test="${member.sex == 'F'}">여자</c:if>
					</td>				
				</tr>
				<tr>
					<th scope="row" align="left">
						 생년월일
					</th>
					<td>
					<c:out value="${fn:substring(member.birthday,0,4)}"/>년
					<c:out value="${fn:substring(member.birthday,4,6)}"/>월
					<c:out value="${fn:substring(member.birthday,6,8)}"/>일
					</td>				
				</tr>
				<tr>
					<th scope="row" align="left">
						* 이메일 수신동의 
					</th>
					<td>
						${member.emailAgreeYn}
					</td>				
				</tr>
				<tr>
					<th scope="row" align="left">
						* 개인정보 활용동의 
					</th>
					<td>
						${member.personalAgreeYn}
					</td>				
				</tr>
			</tbody>
		</table>
	</fieldset>
</form> 
	<div>
		<button onclick="updateMember();" style="font-size:12px;font-family: Malgun Gothic,Gulim;padding:0;margin:0">수정하기</button>
		<button onclick="goMain();" style="font-size:12px;font-family: Malgun Gothic,Gulim;padding:0;margin:0">홈으로</button>
	</div>	
</body>
<script type="text/javascript">
	var form1 = document.form1;		
	
	var updateMember = function(){
		location.href = "/member/joinForm.html"; 
		location.replace("/member/joinForm.html"); 
	}
		
	var goMain = function(){
			location.href = "/main.html"; 
			location.replace("/main.html"); 
	}
</script>
</html>